const mongoose = require('mongoose')
const Schame = mongoose.Schema
let schame = new Schame({
  title: {
    type: String,
    required: true,
  },
  content: {
    type: String,
    required: true,
    default: '没有内容',
  },
  user: {
    type: Schame.Types.ObjectId,
    ref: 'User',
  }
})
module.exports = mongoose.model('Post', schame)
